/* 全局样式 */
:root {
    --primary-color: #4c6ef5;
    --primary-light: #e7eaff;
    --secondary-color: #5e60ce;
    --success-color: #40c057;
    --warning-color: #fcc419;
    --danger-color: #fa5252;
    --info-color: #15aabf;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --body-bg: #f5f7fb;
    --sidebar-bg: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --border-radius: 0.375rem;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: var(--body-bg);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 仪表盘布局 */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) ease;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* 内容区域 */
.content {
    padding: 2rem;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.stat-icon.patients {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.stat-icon.appointments {
    background-color: #fff3bf;
    color: #fab005;
}

.stat-icon.revenue {
    background-color: #ebfbee;
    color: var(--success-color);
}

.stat-icon.reports {
    background-color: #e3fafc;
    color: var(--info-color);
}

.stat-data h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.stat-change span {
    color: #6c757d;
    margin-left: 0.25rem;
}

.stat-change.increase {
    color: var(--success-color);
}

.stat-change.decrease {
    color: var(--danger-color);
}

/* 图表和表格区域 */
.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.chart-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.chart-container {
    height: 300px;
}

.recent-activities {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.recent-activities h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-details p {
    font-size: 0.85rem;
    color: #6c757d;
}

.activity-time {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 0.25rem;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .search-box {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 0 1rem;
    }
    
    .search-box {
        display: none;
    }
    
    .content {
        padding: 1rem;
    }
}

